﻿<UserControl x:Class="LiveEduWizard.TimetableItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:LiveEduWizard"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="70" d:DesignWidth="350"
    Grid.Column="1" Grid.RowSpan="24" VerticalAlignment="Top" Tap="UserControl_Tap">

    <UserControl.Resources>
        <local:VisibilityConverter x:Key="visibilityConverter"/>
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Rectangle Fill="{StaticResource PhoneAccentBrush}" RadiusX="3" RadiusY="3" />
        <Rectangle Stroke="{StaticResource PhoneAccentBrush}" StrokeThickness="2" RadiusY="3" RadiusX="3" />
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <StackPanel>
                <TextBlock Text="{Binding Title}" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White"/>
                <TextBlock Text="{Binding Location}" Style="{StaticResource PhoneTextNormalStyle}" Foreground="White" />
            </StackPanel>
            <StackPanel Margin="5">
                <Image Visibility="{Binding HasTest, Converter={StaticResource visibilityConverter}}" />
                <Image Visibility="{Binding HasProject, Converter={StaticResource visibilityConverter}}" />
                <Image Visibility="{Binding HasHomework, Converter={StaticResource visibilityConverter}}" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
